<?php

/**
 * Antecedentes form base class.
 *
 * @package    form
 * @subpackage antecedentes
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseAntecedentesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'numhistoria'  => new sfWidgetFormPropelSelect(array('model' => 'Historia', 'add_empty' => false)),
      'tabaquismo'   => new sfWidgetFormInputCheckbox(),
      'alcholismo'   => new sfWidgetFormInputCheckbox(),
      'drogas'       => new sfWidgetFormInputCheckbox(),
      'alergias'     => new sfWidgetFormInputCheckbox(),
      'diabetes'     => new sfWidgetFormInputCheckbox(),
      'hipertencion' => new sfWidgetFormInputCheckbox(),
      'encoronarias' => new sfWidgetFormInputCheckbox(),
      'acv'          => new sfWidgetFormInputCheckbox(),
      'altipi'       => new sfWidgetFormInputCheckbox(),
      'cancer'       => new sfWidgetFormInputCheckbox(),
      'asma'         => new sfWidgetFormInputCheckbox(),
      'transpsiqui'  => new sfWidgetFormInputCheckbox(),
      'quien'        => new sfWidgetFormPropelSelect(array('model' => 'Tip_antecede', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorPropelChoice(array('model' => 'Antecedentes', 'column' => 'id', 'required' => false)),
      'numhistoria'  => new sfValidatorPropelChoice(array('model' => 'Historia', 'column' => 'id')),
      'tabaquismo'   => new sfValidatorBoolean(array('required' => false)),
      'alcholismo'   => new sfValidatorBoolean(array('required' => false)),
      'drogas'       => new sfValidatorBoolean(array('required' => false)),
      'alergias'     => new sfValidatorBoolean(array('required' => false)),
      'diabetes'     => new sfValidatorBoolean(array('required' => false)),
      'hipertencion' => new sfValidatorBoolean(array('required' => false)),
      'encoronarias' => new sfValidatorBoolean(array('required' => false)),
      'acv'          => new sfValidatorBoolean(array('required' => false)),
      'altipi'       => new sfValidatorBoolean(array('required' => false)),
      'cancer'       => new sfValidatorBoolean(array('required' => false)),
      'asma'         => new sfValidatorBoolean(array('required' => false)),
      'transpsiqui'  => new sfValidatorBoolean(array('required' => false)),
      'quien'        => new sfValidatorPropelChoice(array('model' => 'Tip_antecede', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('antecedentes[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Antecedentes';
  }


}
